jQuery(document).ready(function($){

	$('#course_type').click(function(){

		//alert($('#course_type option:selected').val());

		$.ajax({
  				url: '/OnlineExam/Exam/',
  				type: 'POST',
  				dataType: 'json',
  				data: {
  						cid:$('#course_type option:selected').val(),
  						},
  				success: function(callback){
            //alert(callback);
            //window.location.reload();
            //alert("aaaaa");
            $('#course_done').empty()
            var i ;
              content = '<ul>' +'<span style="width:35%; float:left;">'
                          +'选择试卷：'+'</span>'
                          +'<select name = "form2" id = "exam_type" style="width:64%; float:left;">';
              for (i in callback.exams)
                      content +='<option value ="'+callback.exams[i].examid+'">'+ callback.exams[i].examname +
                      '</option>';

              content +='</select>'+
                         '</ul>'+'<br>';
        $('#course_done').append(content);
          }
  				
				})

	});
})